﻿using M5.GeminiHybird.Core.Attribute;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace M5.GeminiHybird.Core.JavascriptEvent
{
    public class LocalStorageEvent : BaseJavescriptEvent
    {
        [JavascriptMethod]
        public void SetItem(string key, string value)
        {
            Helper.LocalStorageFileHelper.Instance.SetItem(key, value);
        }

        [JavascriptMethod]
        public string GetItem(string key)
        {
            return Helper.LocalStorageFileHelper.Instance.GetItem(key);
        }

        [JavascriptMethod]
        public void RemoveItem(string key)
        {
            Helper.LocalStorageFileHelper.Instance.RemoveItem(key);
        }
    }
}
